package org.zlb.manager.entity;

import javax.persistence.Basic;
import javax.persistence.Entity;
import javax.persistence.Id;
import java.util.Objects;

/**
 * TODO
 *
 * @author zhoulingbo
 * @date 2021/8/10 12:28
 */
@Entity
@javax.persistence.Table(name = "fun_menu", schema = "admin", catalog = "")
public class FunMenu {
    private String parentCode;

    @Basic
    @javax.persistence.Column(name = "PARENT_CODE")
    public String getParentCode() {
        return parentCode;
    }

    public void setParentCode(String parentCode) {
        this.parentCode = parentCode;
    }

    private String menuCode;

    @Id
    @javax.persistence.Column(name = "MENU_CODE")
    public String getMenuCode() {
        return menuCode;
    }

    public void setMenuCode(String menuCode) {
        this.menuCode = menuCode;
    }

    private String menuName;

    @Basic
    @javax.persistence.Column(name = "MENU_NAME")
    public String getMenuName() {
        return menuName;
    }

    public void setMenuName(String menuName) {
        this.menuName = menuName;
    }

    private String menuNameAbbr;

    @Basic
    @javax.persistence.Column(name = "MENU_NAME_ABBR")
    public String getMenuNameAbbr() {
        return menuNameAbbr;
    }

    public void setMenuNameAbbr(String menuNameAbbr) {
        this.menuNameAbbr = menuNameAbbr;
    }

    private byte menuLevel;

    @Basic
    @javax.persistence.Column(name = "MENU_LEVEL")
    public byte getMenuLevel() {
        return menuLevel;
    }

    public void setMenuLevel(byte menuLevel) {
        this.menuLevel = menuLevel;
    }

    private byte menuType;

    @Basic
    @javax.persistence.Column(name = "MENU_TYPE")
    public byte getMenuType() {
        return menuType;
    }

    public void setMenuType(byte menuType) {
        this.menuType = menuType;
    }

    private byte menuStatus;

    @Basic
    @javax.persistence.Column(name = "MENU_STATUS")
    public byte getMenuStatus() {
        return menuStatus;
    }

    public void setMenuStatus(byte menuStatus) {
        this.menuStatus = menuStatus;
    }

    private String menuIcon;

    @Basic
    @javax.persistence.Column(name = "MENU_ICON")
    public String getMenuIcon() {
        return menuIcon;
    }

    public void setMenuIcon(String menuIcon) {
        this.menuIcon = menuIcon;
    }

    private String menuUrl;

    @Basic
    @javax.persistence.Column(name = "MENU_URL")
    public String getMenuUrl() {
        return menuUrl;
    }

    public void setMenuUrl(String menuUrl) {
        this.menuUrl = menuUrl;
    }

    private String menuDesc;

    @Basic
    @javax.persistence.Column(name = "MENU_DESC")
    public String getMenuDesc() {
        return menuDesc;
    }

    public void setMenuDesc(String menuDesc) {
        this.menuDesc = menuDesc;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        FunMenu funMenu = (FunMenu) o;
        return menuLevel == funMenu.menuLevel &&
                menuType == funMenu.menuType &&
                menuStatus == funMenu.menuStatus &&
                Objects.equals(parentCode, funMenu.parentCode) &&
                Objects.equals(menuCode, funMenu.menuCode) &&
                Objects.equals(menuName, funMenu.menuName) &&
                Objects.equals(menuNameAbbr, funMenu.menuNameAbbr) &&
                Objects.equals(menuIcon, funMenu.menuIcon) &&
                Objects.equals(menuUrl, funMenu.menuUrl) &&
                Objects.equals(menuDesc, funMenu.menuDesc);
    }

    @Override
    public int hashCode() {
        return Objects.hash(parentCode, menuCode, menuName, menuNameAbbr, menuLevel, menuType, menuStatus, menuIcon, menuUrl, menuDesc);
    }
}
